import {baseRequest} from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/group/` + url, ...arg)

export default {
	async queryGroupById(data) {
		return await request('get_by_id', data, 'post')
	},
	async deleteById(data) {
		return await request('delete_by_id', data, 'post')
	},
	async add(data) {
		return await request('add', data, 'post')
	},
	async updateById(data) {
		return await request('update_by_id', data, 'post')
	},
	async queryGroupTree(data) {
		return await request('tree', data, 'post')
	},
	async queryGroupTreeByUrl(data,url){
		const request = (url, ...arg) => baseRequest(url, ...arg)
		return await request(url, data, 'post')

	}
}

